package homework25;

public class Truck extends Car{
    double load;

    // 空参构造器
    public Truck() {
        // 隐式调用 super()
        System.out.println("调用Truck的空参构造器");
    }

    // 全参构造器
    public Truck(String brand, double price, double load) {
        super(brand, price); // 显式调用父类全参构造器
        this.load = load;
        System.out.println("调用Truck的全参构造器：载重" + load + "吨");
    }
}
